package com.woniuxy.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.woniuxy.dao.RecordMapper;
import com.woniuxy.pojo.Record;
import com.woniuxy.service.RecordService;
@Service
@Transactional
public class RecordServiceImpl implements RecordService {
	@Autowired
	private RecordMapper recordMapper;

	@Override
	public List<Record> getAll(Integer id) {
		// TODO Auto-generated method stub
		return recordMapper.getAllRecord(id);
	}

	@Override
	public void addRecord(Record record) {
		// 
		recordMapper.addRecord(record);
		
	}

	@Override
	public void delRecord(Integer id) {
		// TODO Auto-generated method stub
		 recordMapper.delRecord(id);
	}

	@Override
	public void updateRecord(Record record) {
		// TODO Auto-generated method stub
		recordMapper.updateRecord(record);
		
	}

	@Override
	public List<Record> findByName(String name) {
		// TODO Auto-generated method stub
		return recordMapper.findByName(name);
		 
	}

	@Override
	public int deleteManyByIds(String ids) {
		// TODO Auto-generated method stub
		return recordMapper.deleteManyByIds(ids);
	}

	@Override
	public Record getRecordsByCid(Integer cid) {
		// TODO Auto-generated method stub
		return recordMapper.selectOneByCid(cid);
	}

	@Override
	public void saveUpdate(Record record) {
		// TODO Auto-generated method stub
		recordMapper.updateRecord(record);
		
	}

	

	

}
